package com.example.user.handler;

import com.example.user.entity.po.Order;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * Author:汪彬彬
 * date:2024/11/20 16:26
 */
@Component
@Slf4j
@org.springframework.core.annotation.Order(2)
public class CreditHanlder implements OrderHandler {
    @Override
    public boolean handle(Order order) {
        if(order.getCredit()>=20){
            log.info("积分校验完成");
            return true;
        }
        log.info("积分校验完成");
        return false;
    }
}
